/*###############   COPYLEFT GPLv3 LICENSE   ###############
##
## JFX Version 0.2.7
## Website Management Software
## www.jfxcms.com
##
## Copyright 2009 GPLv3 - http://www.opensource.org/licenses/gpl-3.0.html
##
## Anthony Gallon
## oi_antz@hotmail.com
##
## Permission is hereby granted to any person having a copy of this software
## to freely use and modify as required so long as the copyright notices
## and branding remain intact.
##
## Full license details available at http://www.jfxcms.com/license
##
###############   COPYLEFT GPLv3 LICENSE   ###############*/

function cloneObject(o) {
    return $.extend({}, o);
 return eval(uneval(o));
}



function JFXToolbarHide(){

    $('#jfx-toolbar').animate({
        top: '0.5%',
        left: '89.5%',
        height: '24px',
        width: '10%',
        opacity: '0.8'
    }, 500, 'swing');
    $('#jfx-toolbar').attr('origbg', $('#jfx-toolbar').css('background'));
    $('.jfx-toolbar-header').attr('origbg', $('.jfx-toolbar-header').css('background'));
    $('#jfx-toolbar').css('background', 'none');
    $('.jfx-toolbar-header').css('background', 'none');
    $('#jfx-toolbar-minimize-button').css('left', '-2000px');
    $('#jfx-toolbar-minimize-button').css('right', 'auto');
    $('#jfx-toolbar').css('-moz-border-radius', '0');
    $('#jfx-toolbar').bind('mouseenter', JFXToolbarShowFunction);

}

function JFXToolbarShowFunction(){
    $('#jfx-toolbar').css('background', $('#jfx-toolbar').attr('origbg'));
    $('.jfx-toolbar-header').css('background', $('.jfx-toolbar-header').attr('origbg'));
    $('#jfx-toolbar-minimize-button').css('left', 'auto');
    $('#jfx-toolbar-minimize-button').css('right', '10px');
    $(this).unbind('mouseenter', JFXToolbarShowFunction);
    $(this).css('height', 'auto');
    $(this).css('width', '750px');

    var left = (document.body.clientWidth-(750+document.body.clientWidth*0.005));

    $(this).animate({
        opacity : '1',
        left : left
    }, 500, 'swing');

}

function JFXLeftColShow(){
    clearTimeout(JFXLeftColWillHide);
    $('#jfx-leftcol-menu-abs .minimized-heading, #jfx-leftcol-menu-abs .minimized-icon').css('left', '-2000px');
    $(this).css('height', 'auto');
    $(this).css('width', '20%');
    $(this).animate({
        left: '0',
        top: '0',
        opacity: '1'
    }, 500);
}


function JFXLeftColHide(){
    $('#jfx-leftcol-menu-abs').css('overflow', 'hidden');
    $('#jfx-leftcol-menu-abs').animate({
        left: '0',
        top: '0',
        width: '100px',
        height: '24px',
        padding: '0',
        opacity: '0.6'
    }, 500, 'swing');
    $('#jfx-leftcol-menu-abs .minimized-heading, #jfx-leftcol-menu-abs .minimized-icon').css('left', 'auto');

}


